<?php
require 'conectarBD.php';
if(!isset($_COOKIE["user"])){
    header("Location: login.php");
}
else{
    $datos = split("/", $_COOKIE["user"]);
    $query = "select U_Pass from Usuario where U_Login = '" . $datos[1] . "'";
    $res = mysqli_query($con, $query);
    $row = mysqli_fetch_array($res);
    if(!($row["U_Pass"] == $datos[2]))
        header("Location: login.php");
    
}
?>
